<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="icon" th:href="@{/static/console/common/images/favicon.ico}">
    <link rel="stylesheet" type="text/css" th:href="@{/static/console/common/layui/css/layui.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/static/css/element/index.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/static/console/css/public.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/static/console/datepicker/jquery-datePicker.css}" />
    <title>材料管理</title>
    <style>

        .refundModal .msgBox {width: 100%;height: 100%;left: 40%;bottom: inherit;overflow: auto;}
    </style>
</head>
<script th:inline="javascript">
    const materialTypeList = [[${materialTypeList}]]
    const materialList = [[${materialList}]]
    const storeList = [[${storeList}]]
    const displayList = [[${displayList}]]
    const orgList = [[${orgList}]]
    const weightBillList = [[${weightBillList}]]
    const breedTypeList = [[${breedTypeList}]]
</script>
<body>
<div class="layui-card">
    <div class="layui-card-body">
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <div class="layui-form-item layui-inline">
                    <div class="layui-input-inline">
                        <input type="text" placeholder="检索关键字" class="layui-input search-text">
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <select class="search-origin"  lay-filter="search-origin">
                            <!--                            <option value="">选择公司</option>-->
                            <option th:value="${org.id}" th:text="${org.originName}" th:each="org:${orgList}"></option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <select class="search-material" lay-search="" lay-filter="search-material">
                            <option value="">选择检索材料</option>
                            <option th:value="${material.id}" th:text="${material.fullName}" th:each="material:${materialList}"></option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <select class="search-type" lay-search="" lay-filter="search-type">
                            <option value="">材料分类</option>
                            <option th:value="${obj.id}" th:text="${obj.name}" th:each="obj:${materialTypeList}"></option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <select class="search-storeType" lay-search="" lay-filter="search-storeType">
                            <option value="">仓位类型</option>
                            <option th:value="${obj.id}" th:text="${obj.name}" th:each="obj:${storeList}"></option>
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <select class="search-status" lay-filter="search-status">
                            <option value="">状态</option>
                            <option value="0">启用</option>
                            <option value="1">禁用</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-inline">
                    <a href="javascript:void(0)" class="layui-btn layui-btn-md layui-btn-danger btn-query" lay-filter="btn-query">
                        <i class="layui-icon layui-icon-search"></i>
                        查询
                    </a>
                    <a href="javascript:void(0)" type="reset" class="layui-btn layui-btn-normal btn-add" lay-filter="btn-add">
                        <i class="layui-icon">&#xe654;</i>
                        添加
                    </a>
                    <!--                    <a href="javascript:void(0)" type="reset" class="layui-btn layui-btn-warm btn-edit" lay-filter="btn-edit">-->
                    <!--                        <i class="layui-icon layui-icon-edit"></i>-->
                    <!--                        编辑-->
                    <!--                    </a>-->
                </div>
            </div>
        </form>
    </div>
</div>
<div class="layui-card">
    <div class="layui-card-body">
        <table class="layui-hide" id="body-list" lay-filter="body-list"></table>
    </div>
</div>
<!--添加弹窗-->
<div class="msgModal addModal" id="material-body">
    <div class="msgBox">
        <div class="msgBox-title">
            <h3 style="text-align: left; padding-left: 80px;">添加材料</h3>
            <a class="close" href="javascript:void(0);"><img src="/static/console/img/close-btn.png" /></a>
        </div>
        <div class="msgBox-con">
            <form class="layui-form" style="width: 60%;">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">公司</label>
                        <div class="layui-input-inline">
                            <select class="add-origin" lay-filter="add-origin">
                                <option value="">选择公司</option>
                                <option th:value="${org.id}" th:text="${org.originName}" th:each="org:${orgList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">材料</label>
                        <div class="layui-input-inline">
                            <select class="add-material" lay-search="" lay-filter="add-material">
                                <option value="">选择材料</option>
                                <option th:value="${material.id}" th:nameNorms="${material.fullName}" th:text="${material.fullName}" th:data-code="${material.code}" th:data-type="${material.type}" th:data-norms="${material.norms}" th:each="material:${materialList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">材料编号</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input add-code" readonly placeholder="材料编号">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">规格</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input add-norms" readonly placeholder="规格">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">规格全称</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input add-nameNorms" readonly placeholder="规格全称">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">材料分类</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input add-type" placeholder="材料分类">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">工控分类</label>
                        <div class="layui-input-inline">
                            <!--                            <input type="text" class="layui-input add-today" placeholder="请选择统计时间">-->
                            <select class="add-breedType" lay-search=""  lay-filter="add-breedType">
                                <option th:value="${obj.id}" th:text="${obj.name}"  th:each="obj:${breedTypeList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">结算重量类型</label>
                        <div class="layui-input-inline">
                            <!--                            <input type="text" class="layui-input add-today" placeholder="请选择统计时间">-->
                            <select class="add-weightBillType" lay-search=""  lay-filter="add-breedType">
                                <option th:value="${obj.id}" th:text="${obj.name}"  th:each="obj:${weightBillList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">上级材料</label>
                        <div class="layui-input-inline">
                            <!--                            <input type="text" class="layui-input add-today" placeholder="请选择统计时间">-->
                            <select class="add-parentId" lay-search=""  lay-filter="add-parentId">
                                <option value="">选择材料</option>
                                <option th:value="${material.id}" th:text="${material.fullName}" th:data-nameNorms="${material.fullName}" th:data-code="${material.code}" th:data-type="${material.type}" th:data-norms="${material.norms}" th:each="material:${materialList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">上级材料</label>
                        <div class="layui-input-inline">
                            <!--                            <input type="text" class="layui-input add-today" placeholder="请选择统计时间">-->
                            <select class="add-parentId" lay-search=""  lay-filter="add-parentId">
                                <option value="">选择材料</option>
                                <option th:value="${material.id}" th:text="${material.fullName}" th:data-nameNorms="${material.fullName}" th:data-code="${material.code}" th:data-type="${material.type}" th:data-norms="${material.norms}" th:each="material:${materialList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">过磅显示</label>
                        <div class="layui-input-inline">
                            <select class="add-display" lay-search="" lay-filter="add-display">
<!--                                <option value="">选择材料</option>-->
                                <option th:value="${obj.id}" th:text="${obj.name}" th:each="obj:${displayList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">仓位类型</label>
                        <div class="layui-input-inline">
                            <select class="add-store" lay-search="" lay-filter="add-store">
                                <option value="">选择仓位类型</option>
                                <option th:value="${obj.id}" th:text="${obj.name}" th:each="obj:${storeList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block" style="margin-left: 80px;">
                        <textarea placeholder="请输入内容" class="layui-textarea remark" style="resize: none;"></textarea>
                    </div>
                </div>
                <div class="layui-form-item" style="text-align: center;">
                    <div class="">
                        <a class="layui-btn btn-submit" lay-submit lay-filter="addBtns">保存</a>
                    </div>
                </div>
            </form>

        </div>
    </div>
</div>

<!--编辑-->
<div class="msgModal updateModal" id="update-material-body">
    <div class="msgBox">
        <div class="msgBox-title">
            <h3 style="text-align: left; padding-left: 80px;">修改材料数据</h3>
            <a class="close" href="javascript:void(0);"><img src="/static/console/img/close-btn.png" /></a>
        </div>
        <div class="msgBox-con">
            <form class="layui-form" style="width: 40%;">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">公司</label>
                        <div class="layui-input-inline">
                            <select class="update-origin" lay-filter="update-origin">
                                <option value="">选择公司</option>
                                <option th:value="${org.id}" th:text="${org.originName}" th:each="org:${orgList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">材料</label>
                        <div class="layui-input-inline">
                            <select class="update-material" lay-search="" lay-filter="update-material">
                                <option value="">选择材料</option>
                                <option th:value="${material.id}" th:text="${material.fullName}" th:data-code="${material.code}" th:data-type="${material.type}" th:data-norms="${material.norms}" th:each="material:${materialList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">材料编号</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input update-code" readonly placeholder="材料编号">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">规格</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input update-norms" readonly placeholder="规格">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">规格全称</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input update-nameNorms" readonly placeholder="规格全称">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">材料分类</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input update-type" placeholder="材料分类">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">工控分类</label>
                        <div class="layui-input-inline">
                            <!--                            <input type="text" class="layui-input add-today" placeholder="请选择统计时间">-->
                            <select class="update-breedType" lay-search=""  lay-filter="update-breedType">
                                <option th:value="${obj.id}" th:text="${obj.name}"  th:each="obj:${breedTypeList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">结算重量类型</label>
                        <div class="layui-input-inline">
                            <!--                            <input type="text" class="layui-input add-today" placeholder="请选择统计时间">-->
                            <select class="update-weightBillType" lay-search=""  lay-filter="update-breedType">
                                <option th:value="${obj.id}" th:text="${obj.name}"  th:each="obj:${weightBillList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">上级材料</label>
                        <div class="layui-input-inline">
                            <!--                            <input type="text" class="layui-input add-today" placeholder="请选择统计时间">-->
                            <select class="update-parentId" lay-search=""  lay-filter="update-parentId">
                                <option value="">选择材料</option>
                                <option th:value="${material.id}" th:text="${material.fullName}" th:data-code="${material.code}" th:data-type="${material.type}" th:data-norms="${material.norms}" th:each="material:${materialList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">过磅显示</label>
                        <div class="layui-input-inline">
                            <select class="update-display" lay-search="" lay-filter="update-display">
                                <!--                                <option value="">选择材料</option>-->
                                <option th:value="${obj.id}" th:text="${obj.name}" th:each="obj:${displayList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">仓位类型</label>
                        <div class="layui-input-inline">
                            <select class="update-store" lay-search="" lay-filter="update-store">
                                <option value="">选择仓位类型</option>
                                <option th:value="${obj.id}" th:text="${obj.name}" th:each="obj:${storeList}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block" style="margin-left: 80px;">
                        <textarea placeholder="请输入内容" class="layui-textarea remark" style="resize: none;"></textarea>
                    </div>
                </div>
                <div class="layui-form-item" style="text-align: center;">
                    <div class="">
                        <a class="layui-btn btn-submit" lay-submit lay-filter="updateBtns">保存</a>
                    </div>
                </div>
            </form>

        </div>
    </div>
</div>

</body>

<script type="text/javascript" th:src="@{/static/console/assets/js/jquery-3.2.1.min.js}"></script>
<script type="text/javascript" th:src="@{/static/console/common/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/static/console/js/pages/base.js}" charset="utf-8"></script>
<script type="text/javascript" th:src="@{/static/js/vue.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/element/index.js}"charset="utf-8"></script>
<script type="text/javascript" th:src="@{/static/console/datepicker/jquery-datePicker.js}"charset="utf-8"></script>
<script type="text/javascript" th:src="@{/static/console/js/pages/material/material.js}" charset="utf-8"></script>
<script type="text/javascript">

</script>

</html>